<!-- 第一行统计数据 -->
<template>
	<el-row :gutter="14">
		<el-col :lg="8" :sm="8" :xs="24">
			<div class="sa-wnk">
				<img src="../../static/icon/icon-user.png" >
				<div class="sa-wnk-tv">
					<p class="sa-wnk-title">用户</p>
					<p class="sa-wnk-value">{{userCount}}</p>
				</div>
			</div>
		</el-col>
		<el-col :lg="8" :sm="8" :xs="24">
			<div class="sa-wnk">
				<img src="../../static/icon/icon-order.png" >
				<div class="sa-wnk-tv">
					<p class="sa-wnk-title">订单</p>
					<p class="sa-wnk-value">{{orderCount}}</p>
				</div>
			</div>
		</el-col>
		<el-col :lg="8" :sm="8" :xs="24">
			<div class="sa-wnk">
				<img src="../../static/icon/icon-money.png" >
				<div class="sa-wnk-tv">
					<p class="sa-wnk-title">外账</p>
					<p class="sa-wnk-value">{{moneyCount}}</p>
				</div>
			</div>
		</el-col>
	</el-row>
</template>

<script>
	module.exports = {
		data() {
			return {
				// 统计数据

					userCount: 0,
					orderCount: 0,
					moneyCount: 0,

			}
		},

		created() {

      sa.ajax('/order/getOrderCount',function (res){
        this.userCount=res.data
      }.bind(this));
      sa.ajax('/customer/getCustomerCount',function (res){
         this.orderCount=res.data
      }.bind(this))
      sa.ajax('/order/getAllUnpaidAmount',function (res){
         this.moneyCount=res.data
      }.bind(this))

		}
	}
</script>

<style scoped>
	/* 第一行 */
	.sa-wnk{background-color: #FFF; border: 1px #ddd solid; margin-bottom: 14px; min-height: 100px; 
		cursor: pointer; transition: all 0.3s; overflow: hidden;}
	.sa-wnk:hover{box-shadow: 0 0 20px #999;}
	.sa-wnk img{float: left; line-height: 100px; margin: 25px 0px 0 20px; width: 50px; height: 50px; vertical-align: middle;}
	.sa-wnk .sa-wnk-tv{float: left; margin-left: 10px; max-width: calc(100% - 100px);}
	.sa-wnk-title{margin-top: 25px; font-size: 16px;}
	.sa-wnk-value{margin-top: 4px; font-size: 24px; padding-bottom: 20px;}
</style>
